package com.taoz.rpc.server;

import com.taoz.rpc.common.service.UserService;
import com.taoz.rpc.core.bootstrap.ServerBootstrap;
import com.taoz.rpc.core.config.ApplicationConfig;
import com.taoz.rpc.core.model.LocalServiceInfo;
import com.taoz.rpc.core.model.ServiceMetaInfo;
import com.taoz.rpc.core.registry.LocalRegistry;
import com.taoz.rpc.core.registry.Registry;
import com.taoz.rpc.core.registry.RegistryFactory;
import com.taoz.rpc.core.server.VertxHttpServer;
import com.taoz.rpc.core.server.tcp.VertxTcpServer;
import com.taoz.rpc.server.service.UserServiceImpl;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

@Slf4j
public class Server {
    public static void main(String[] args) throws Exception {
        List<LocalServiceInfo> localServiceInfoList = new ArrayList<>();
        localServiceInfoList.add(new LocalServiceInfo(UserService.class.getName(), UserServiceImpl.class));
        ServerBootstrap.init(localServiceInfoList);
    }
}
